package com.huanletao.crypto;

import java.io.File;
import java.security.KeyPair;

/**
 * <p>
 * </p>
 * package: com.huanletao.crypto
 * description:
 * className: demo
 * author:  踏雪无痕
 * copyright: Copyright (c) 2023/5/23 10:41
 * since: 1.0.0
 */
public class demo {

    public static void main(String[] args) {

        String data = Base64Utils.imageToBase64(new File("D:\\demo\\head.jpg"));
        KeyPair ecKeyPair = SM2Utils.createECKeyPair();
        String encrypt = SM2Utils.encrypt(ecKeyPair.getPublic().toString(), data);
        System.out.println("encrypt = " + encrypt);
    }
}
